<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <style></style>
  </head>
  <body>
    <div></div>
    <script>
      //  把函数赋值给变量
      let fn = function () {
        console.log("Hello First-class Function");
      };
      // fn();

      // 一个示例
      const BlogController = {
        index(posts) {
          return View.index(posts);
        },
        show(post) {
          return View.show(post);
        },
        create(attes) {
          return View.create(attes);
        },
        update(post, attrs) {
          return Db.update(post, attrs);
        },
        destory(post) {
          return Db.destory(post);
        },
      };

      //优化
      const BlogController = {
        index: Views.index,
        show: Views.show,
        create: Views.create,
        update: Db.update,
        destory: Db.destory,
      };




      
    </script>
  </body>
</html>
